package com.hutu.erp.catalog.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hutu.erp.catalog.dto.CategoryOutput;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.model.BaseModel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * Description: com.hutu.erp.catalog.model
 * User: hushibo
 * Date: 2021-05-26 12:28
 * Time: 12:28
 * Version: 1.0
 */
public class ProductModel extends BaseModel {


    private static final long serialVersionUID = 2864138933337447993L;

    public boolean isChangeCover() {
        return changeCover;
    }

    public void setChangeCover(boolean changeCover) {
        this.changeCover = changeCover;
    }

    private boolean changeCover = false;

    /** 商品id */
    private Long productId;

    /** 商品名称 */
    @Excel(name = "商品名称")
    private String productName;

    /** 商品编码 */
    @Excel(name = "商品编码")
    private String productCode;

    /** 商品简称 */
    @Excel(name = "商品简称")
    private String alternativeName;

    /** 查询码 */
    @Excel(name = "查询码")
    private String lookup;

    /** 商品分类 */
    @Excel(name = "商品分类")
    private Long categoryId;



    /** 封面图片 */
    @Excel(name = "封面图片")
    private Long coverId;

    private String coverUrl;

    /** 规格 */
    @Excel(name = "规格")
    private String specification;

    /** 采购单位 */
    @Excel(name = "采购单位")
    private String purchaseUnit;

    /** 单位 */
    @Excel(name = "单位")
    private String standardUnit;

    /** 拆零单位 */
    @Excel(name = "拆零单位")
    private String unboxUnit;

    /** 品牌 */
    @Excel(name = "品牌")
    private String brand;

    /** seo关键字 */
    @Excel(name = "seo关键字")
    private String metaKeywords;

    /** 商品seo标题 */
    @Excel(name = "商品seo标题")
    private String metaTitle;

    /** 商品seo描述 */
    @Excel(name = "商品seo描述")
    private String metaDescription;

    /** 唯一标识 */
    @Excel(name = "唯一标识")
    private String sku;

    /** 商品简述 */
    @Excel(name = "商品简述")
    private String shortDescription;

    /** 商品详情 */
    @Excel(name = "商品详情")
    private String fullDescription;

    /** 供应商id */
    @Excel(name = "供应商id")
    private Long vendorId;

    /** 售价 */
    @Excel(name = "售价")
    private BigDecimal salesPrice;

    /** 原价 */
    @Excel(name = "原价")
    private BigDecimal oldSalesPrice;

    /** 采购价 */
    @Excel(name = "采购价")
    private BigDecimal purchasePrice;

    /** 上架标志（0代表上架 2代表未上架） */
    @Excel(name = "上架标志", readConverterExp = "0=代表上架,2=代表未上架")
    private Integer published;

    /** 删除标志（0代表存在 2代表删除） */
    @Excel(name = "删除标志", readConverterExp = "0=代表存在,2=代表删除")
    private Integer deleted;

    /** 显示顺序 */
    @Excel(name = "显示顺序")
    private Long displayOrder;

    /** 创建者 */
    @Excel(name = "创建者")
    private String createdBy;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 更新者 */
    @Excel(name = "更新者")
    private String updatedBy;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;


    private PictureModel cover;

    private List<ProductPictureModel> pictureList;

    public List<ProductPictureModel> getPictureList() {
        return pictureList;
    }

    public void setPictureList(List<ProductPictureModel> pictures) {
        this.pictureList = pictures;
    }

    public void setProductId(Long productId)
    {
        this.productId = productId;
    }

    public Long getProductId()
    {
        return productId;
    }
    public void setProductName(String productName)
    {
        this.productName = productName;
    }

    public String getProductName()
    {
        return productName;
    }
    public void setProductCode(String productCode)
    {
        this.productCode = productCode;
    }

    public String getProductCode()
    {
        return productCode;
    }
    public void setAlternativeName(String alternativeName)
    {
        this.alternativeName = alternativeName;
    }

    public String getAlternativeName()
    {
        return alternativeName;
    }
    public void setLookup(String lookup)
    {
        this.lookup = lookup;
    }

    public String getLookup()
    {
        return lookup;
    }
    public void setCategoryId(Long categoryId)
    {
        this.categoryId = categoryId;
    }

    public Long getCategoryId()
    {
        return categoryId;
    }
    public void setCoverId(Long coverId)
    {
        this.coverId = coverId;
    }

    public Long getCoverId()
    {
        return coverId;
    }
    public String getCoverUrl() {
        return coverUrl;
    }

    public void setCoverUrl(String coverUrl) {
        this.coverUrl = coverUrl;
    }

    public void setSpecification(String specification)
    {
        this.specification = specification;
    }

    public String getSpecification()
    {
        return specification;
    }
    public void setPurchaseUnit(String purchaseUnit)
    {
        this.purchaseUnit = purchaseUnit;
    }

    public String getPurchaseUnit()
    {
        return purchaseUnit;
    }
    public void setStandardUnit(String standardUnit)
    {
        this.standardUnit = standardUnit;
    }

    public String getStandardUnit()
    {
        return standardUnit;
    }
    public void setUnboxUnit(String unboxUnit)
    {
        this.unboxUnit = unboxUnit;
    }

    public String getUnboxUnit()
    {
        return unboxUnit;
    }
    public void setBrand(String brand)
    {
        this.brand = brand;
    }

    public String getBrand()
    {
        return brand;
    }
    public void setMetaKeywords(String metaKeywords)
    {
        this.metaKeywords = metaKeywords;
    }

    public String getMetaKeywords()
    {
        return metaKeywords;
    }
    public void setMetaTitle(String metaTitle)
    {
        this.metaTitle = metaTitle;
    }

    public String getMetaTitle()
    {
        return metaTitle;
    }
    public void setMetaDescription(String metaDescription)
    {
        this.metaDescription = metaDescription;
    }

    public String getMetaDescription()
    {
        return metaDescription;
    }
    public void setSku(String sku)
    {
        this.sku = sku;
    }

    public String getSku()
    {
        return sku;
    }
    public void setShortDescription(String shortDescription)
    {
        this.shortDescription = shortDescription;
    }

    public String getShortDescription()
    {
        return shortDescription;
    }
    public void setFullDescription(String fullDescription)
    {
        this.fullDescription = fullDescription;
    }

    public String getFullDescription()
    {
        return fullDescription;
    }
    public void setVendorId(Long vendorId)
    {
        this.vendorId = vendorId;
    }

    public Long getVendorId()
    {
        return vendorId;
    }
    public void setSalesPrice(BigDecimal salesPrice)
    {
        this.salesPrice = salesPrice;
    }

    public BigDecimal getSalesPrice()
    {
        return salesPrice;
    }
    public void setOldSalesPrice(BigDecimal oldSalesPrice)
    {
        this.oldSalesPrice = oldSalesPrice;
    }

    public BigDecimal getOldSalesPrice()
    {
        return oldSalesPrice;
    }
    public void setPurchasePrice(BigDecimal purchasePrice)
    {
        this.purchasePrice = purchasePrice;
    }

    public BigDecimal getPurchasePrice()
    {
        return purchasePrice;
    }
    public void setPublished(Integer published)
    {
        this.published = published;
    }

    public Integer getPublished()
    {
        return published;
    }
    public void setDeleted(Integer deleted)
    {
        this.deleted = deleted;
    }

    public Integer getDeleted()
    {
        return deleted;
    }
    public void setDisplayOrder(Long displayOrder)
    {
        this.displayOrder = displayOrder;
    }

    public Long getDisplayOrder()
    {
        return displayOrder;
    }
    public void setCreatedBy(String createdBy)
    {
        this.createdBy = createdBy;
    }

    public String getCreatedBy()
    {
        return createdBy;
    }
    public void setCreatedAt(Date createdAt)
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt()
    {
        return createdAt;
    }
    public void setUpdatedBy(String updatedBy)
    {
        this.updatedBy = updatedBy;
    }

    public String getUpdatedBy()
    {
        return updatedBy;
    }
    public void setUpdatedAt(Date updatedAt)
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt()
    {
        return updatedAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("productId", getProductId())
                .append("productName", getProductName())
                .append("productCode", getProductCode())
                .append("alternativeName", getAlternativeName())
                .append("lookup", getLookup())
                .append("categoryId", getCategoryId())
                .append("coverId", getCoverId())
                .append("specification", getSpecification())
                .append("purchaseUnit", getPurchaseUnit())
                .append("standardUnit", getStandardUnit())
                .append("unboxUnit", getUnboxUnit())
                .append("brand", getBrand())
                .append("metaKeywords", getMetaKeywords())
                .append("metaTitle", getMetaTitle())
                .append("metaDescription", getMetaDescription())
                .append("sku", getSku())
                .append("shortDescription", getShortDescription())
                .append("fullDescription", getFullDescription())
                .append("vendorId", getVendorId())
                .append("salesPrice", getSalesPrice())
                .append("oldSalesPrice", getOldSalesPrice())
                .append("purchasePrice", getPurchasePrice())
                .append("published", getPublished())
                .append("deleted", getDeleted())
                .append("displayOrder", getDisplayOrder())
                .append("createdBy", getCreatedBy())
                .append("createdAt", getCreatedAt())
                .append("updatedBy", getUpdatedBy())
                .append("updatedAt", getUpdatedAt())
                .toString();
    }

    public PictureModel getCover() {
        return cover;
    }

    public void setCover(PictureModel cover) {
        this.cover = cover;
    }
}
